<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>

        // 编译中文，英文和数字不会被编译

        // 编码  encodeURIComponent()
        // 解码  decodeURIComponent()


        const str = '你好hello123' ;
        const res = encodeURIComponent(str) ;
        console.log(res);

        const str2 = '%E4%BD%A0%E5%A5%BDhello123' ;
        console.log(decodeURIComponent(str2));

    </script>
    
</body>
</html>